package com.guijq;

import java.net.MalformedURLException;
import java.text.ParseException;

	import net.sourceforge.plantumldependency.cli.main.program.PlantUMLDependencyProgram;
	import net.sourceforge.plantumldependency.commoncli.command.CommandLine;
	import net.sourceforge.plantumldependency.commoncli.command.impl.CommandLineImpl;
	import net.sourceforge.plantumldependency.commoncli.exception.CommandLineException;
	import net.sourceforge.plantumldependency.commoncli.program.JavaProgram;
	import net.sourceforge.plantumldependency.commoncli.program.execution.JavaProgramExecution;

	public class Main {

	    public static void main(final String[] args) throws MalformedURLException, CommandLineException, ParseException {

	        // Creates the PlantUML Dependency arguments as they would be written in the command line
	        final CommandLine commandLineArguments = new CommandLineImpl(new String[] {"-o", "plantuml-jdk-1.7.0.51.txt", "-b", "C:\\jdk-1.7.0.51-src", "-e", "**/package-info.java"});

	        // Creates the PlantUML Dependency program instance
	        final JavaProgram plantumlDependencyProgram = new PlantUMLDependencyProgram();

	        // Get the PlantUML Dependency program execution instance following the command line arguments, ready to be executed
	        final JavaProgramExecution plantumlDependencyProgramExecution = plantumlDependencyProgram.parseCommandLine(commandLineArguments);

	        // Executes the PlantUML Dependency program
	        plantumlDependencyProgramExecution.execute();
	    }
	}
	